/*
 * @Author: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @Date: 2022-09-21 09:22:49
 * @LastEditors: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @LastEditTime: 2022-10-07 16:45:04
 * @FilePath: \客户端\app\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'layout',
    component: import(/* webpackChunkName: "about" */ '../views/Layout.vue')
  },
  {
    path: '/',
    name: 'layout',
    redirect:'layout/article',
    component: () => import(/* webpackChunkName: "about" */ '../views/Layout.vue'),
    children:[
      {
        path: 'layout/article',
        name: 'article',
        component: import(/* webpackChunkName: "about" */ '../views/Article/index.vue')
      },
      {
        path: 'layout/archives',
        name: 'archives',
        component: import(/* webpackChunkName: "about" */ '../views/Archives/index.vue')
      },
      {
        path: 'layout/knowledgeBooks',
        name: 'knowledgeBooks',
        component: import(/* webpackChunkName: "about" */ '../views/KnowledgeBooks/index.vue')
      },
      {
        path: 'layout/knowledgeItem',
        name: 'knowledgeItem',
        component: import(/* webpackChunkName: "about" */ '../views/knowledgeItem/index.vue')
      },
      {
        path: 'layout/message',
        name: 'message',
        component: import(/* webpackChunkName: "about" */ '../views/Message/index.vue')
      },
      {
        path: 'layout/socket',
        name: 'socket',
        component: import(/* webpackChunkName: "about" */ '../views/Socket/index.vue')
      },
      {
        path: 'layout/articleItem',
        name: 'articleItem',
        component: import(/* webpackChunkName: "about" */ '../views/articleItem/index.vue')
      },
      {
        path: 'layout/detail',
        name: 'detail',
        component: import(/* webpackChunkName: "about" */ '../views/detail/index.vue')
      },
    ]
  },
  {
    path: '/search',
    name: 'search',
    component: import(/* webpackChunkName: "about" */ '../views/search/index.vue')
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
